Micron Document
`:top
A `!triangular function`! (also known as a `!triangle function`!, `!hat function`!, or `!tent function`!) is a function whose graph takes the shape of a triangle. Often this is an `F33f`_`[isosceles triangle`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Isosceles_triangle]`_`f of height 1 and base 2 in which case it is referred to as `*the`* triangular function. Triangular functions are useful in `F33f`_`[signal processing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Signal_processing]`_`f and `*communication systems engineering`* as representations of idealized signals, and the triangular function specifically as an `F33f`_`[integral transform`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Integral_transform]`_`f kernel function from which more realistic signals can be derived, for example in `F33f`_`[kernel density estimation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Kernel_density_estimation]`_`f. It also has applications in `F33f`_`[pulse-code modulation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Pulse-code_modulation]`_`f as a pulse shape for transmitting `F33f`_`[digital signals`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Digital_signal_(electronics)]`_`f and as a `F33f`_`[matched filter`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Matched_filter]`_`f for receiving the signals. It is also used to define the `!triangular window`! sometimes called the `F33f`_`[Bartlett window`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bartlett_window]`_`f.

>>Contents

• `F0af`_`[Definitions`#definitions]`_`f
• `F0af`_`[Scaling`#scaling]`_`f
• `F0af`_`[Fourier transform`#fourier-transform]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f

-─

>>Definitions

The most common definition is as a piecewise function:

tri ⁡ ⁡ ( x ) = Λ Λ ( x ) = def max ( 1 − − | x | , 0 ) = { 1 − − | x | , | x | < 1 ; 0 otherwise . {\\displaystyle {\\begin{aligned}\\operatorname {tri} (x)=\\Lambda (x)\\ &{\\overset {\\underset {\\text{def}}{}}{=}}\\ \\max {\\big (}1-|x|,0{\\big )}\\\\&={\\begin{cases}1-|x|,&|x|<1;\\\\0&{\\text{otherwise}}.\\\\\\end{cases}}\\end{aligned}}}

Equivalently, it may be defined as the `F33f`_`[convolution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Convolution]`_`f of two identical unit `F33f`_`[rectangular functions`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Rectangular_function]`_`f:

tri ⁡ ⁡ ( x ) = rect ⁡ ⁡ ( x ) ∗ ∗ rect ⁡ ⁡ ( x ) = ∫ ∫ − − ∞ ∞ ∞ ∞ rect ⁡ ⁡ ( x − − τ τ ) ⋅ ⋅ rect ⁡ ⁡ ( τ τ ) d τ τ . {\\displaystyle {\\begin{aligned}\\operatorname {tri} (x)&=\\operatorname {rect} (x)*\\operatorname {rect} (x)\\\\&=\\int _{-\\infty }^{\\infty }\\operatorname {rect} (x-\\tau )\\cdot \\operatorname {rect} (\\tau )\\,d\\tau .\\\\\\end{aligned}}}

The triangular function can also be represented as the product of the rectangular and `F33f`_`[absolute value`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Absolute_value]`_`f functions:

tri ⁡ ⁡ ( x ) = rect ⁡ ⁡ ( x / 2 ) ( 1 − − | x | ) . {\\displaystyle \\operatorname {tri} (x)=\\operatorname {rect} (x/2){\\big (}1-|x|{\\big )}.}

Note that some authors instead define the triangle function to have a base of width 1 instead of width 2:

tri ⁡ ⁡ ( 2 x ) = Λ Λ ( 2 x ) = def max ( 1 − − 2 | x | , 0 ) = { 1 − − 2 | x | , | x | < 1 2 ; 0 otherwise . {\\displaystyle {\\begin{aligned}\\operatorname {tri} (2x)=\\Lambda (2x)\\ &{\\overset {\\underset {\\text{def}}{}}{=}}\\ \\max {\\big (}1-2|x|,0{\\big )}\\\\&={\\begin{cases}1-2|x|,&|x|<{\\tfrac {1}{2}};\\\\0&{\\text{otherwise}}.\\\\\\end{cases}}\\end{aligned}}}

In its most general form a triangular function is any linear `F33f`_`[B-spline`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=B-spline]`_`f:`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f]

tri j ⁡ ⁡ ( x ) = { ( x − − x j − − 1 ) / ( x j − − x j − − 1 ) , x j − − 1 ≤ ≤ x < x j ; ( x j + 1 − − x ) / ( x j + 1 − − x j ) , x j ≤ ≤ x < x j + 1 ; 0 otherwise . {\\displaystyle \\operatorname {tri} _{j}(x)={\\begin{cases}(x-x_{j-1})/(x_{j}-x_{j-1}),&x_{j-1}\\leq x<x_{j};\\\\(x_{j+1}-x)/(x_{j+1}-x_{j}),&x_{j}\\leq x<x_{j+1};\\\\0&{\\text{otherwise}}.\\end{cases}}}

Whereas the definition at the top is a special case

Λ Λ ( x ) = tri j ⁡ ⁡ ( x ) , {\\displaystyle \\Lambda (x)=\\operatorname {tri} _{j}(x),}

where x j − − 1 = − − 1 {\\displaystyle x_{j-1}=-1} , x j = 0 {\\displaystyle x_{j}=0} , and x j + 1 = 1 {\\displaystyle x_{j+1}=1} .

A linear B-spline is the same as a continuous `F33f`_`[piecewise linear function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Piecewise_linear_function]`_`f f ( x ) {\\displaystyle f(x)} , and this general triangle function is useful to formally define f ( x ) {\\displaystyle f(x)} as

f ( x ) = ∑ ∑ j y j ⋅ ⋅ tri j ⁡ ⁡ ( x ) , {\\displaystyle f(x)=\\sum _{j}y_{j}\\cdot \\operatorname {tri} _{j}(x),}

where x j < x j + 1 {\\displaystyle x_{j}<x_{j+1}} for all integer j {\\displaystyle j} . The piecewise linear function passes through every point expressed as coordinates with `F33f`_`[ordered pair`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ordered_pair]`_`f ( x j , y j ) {\\displaystyle (x_{j},y_{j})} , that is,

f ( x j ) = y j {\\displaystyle f(x_{j})=y_{j}} .

>>Scaling

For any parameter a ≠ ≠ 0 {\\displaystyle a\\neq 0} :

tri ⁡ ⁡ ( t a ) = ( 1 a ) rect ⁡ ⁡ ( t a ) ∗ ∗ ( 1 a ) rect ⁡ ⁡ ( t a ) = ∫ ∫ − − ∞ ∞ ∞ ∞ 1 | a | rect ⁡ ⁡ ( τ τ a ) ⋅ ⋅ rect ⁡ ⁡ ( t − − τ τ a ) d τ τ = { 1 − − | t / a | , | t | < | a | ; 0 otherwise . {\\displaystyle {\\begin{aligned}\\operatorname {tri} \\left({\\tfrac {t}{a}}\\right)&=\\left({\\tfrac {1}{\\sqrt {a}}}\\right)\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)*\\left({\\tfrac {1}{\\sqrt {a}}}\\right)\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)=\\int _{-\\infty }^{\\infty }{\\tfrac {1}{|a|}}\\operatorname {rect} \\left({\\tfrac {\\tau }{a}}\\right)\\cdot \\operatorname {rect} \\left({\\tfrac {t-\\tau }{a}}\\right)\\,d\\tau \\\\&={\\begin{cases}1-|t/a|,&|t|<|a|;\\\\0&{\\text{otherwise}}.\\end{cases}}\\end{aligned}}}

>>Fourier transform

The transform is easily determined using the `F33f`_`[convolution property of Fourier transforms`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fourier_transform]`_`f and the `F33f`_`[Fourier transform of the rectangular function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fourier_transform]`_`f:

F { tri ⁡ ⁡ ( t ) } = F { rect ⁡ ⁡ ( t ) ∗ ∗ rect ⁡ ⁡ ( t ) } = F { rect ⁡ ⁡ ( t ) } ⋅ ⋅ F { rect ⁡ ⁡ ( t ) } = F { rect ⁡ ⁡ ( t ) } 2 = s i n c 2 ( f ) , {\\displaystyle {\\begin{aligned}{\\mathcal {F}}\\{\\operatorname {tri} (t)\\}&={\\mathcal {F}}\\{\\operatorname {rect} (t)*\\operatorname {rect} (t)\\}\\\\&={\\mathcal {F}}\\{\\operatorname {rect} (t)\\}\\cdot {\\mathcal {F}}\\{\\operatorname {rect} (t)\\}\\\\&={\\mathcal {F}}\\{\\operatorname {rect} (t)\\}^{2}\\\\&=\\mathrm {sinc} ^{2}(f),\\end{aligned}}}

where sinc ⁡ ⁡ ( x ) = sin ⁡ ⁡ ( π π x ) / ( π π x ) {\\displaystyle \\operatorname {sinc} (x)=\\sin(\\pi x)/(\\pi x)} is the `F33f`_`[normalized sinc function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Sinc_function]`_`f.

For the general form, we have:

F { tri ⁡ ⁡ ( t a ) } = F { 1 a rect ⁡ ⁡ ( t a ) ∗ ∗ 1 a rect ⁡ ⁡ ( t a ) } = 1 a F { rect ⁡ ⁡ ( t a ) } ⋅ ⋅ F { rect ⁡ ⁡ ( t a ) } = 1 a F { rect ⁡ ⁡ ( t a ) } 2 = 1 a a 2 s i n c 2 ( a ⋅ ⋅ f ) = a s i n c 2 ( a ⋅ ⋅ f ) . {\\displaystyle {\\begin{aligned}{\\mathcal {F}}\\{\\operatorname {tri} \\left({\\tfrac {t}{a}}\\right)\\}&={\\mathcal {F}}\\{{\\tfrac {1}{\\sqrt {a}}}\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)*{\\tfrac {1}{\\sqrt {a}}}\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)\\}\\\\&={\\tfrac {1}{a}}\\ {\\mathcal {F}}\\{\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)\\}\\cdot {\\mathcal {F}}\\{\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)\\}\\\\&={\\tfrac {1}{a}}\\ {\\mathcal {F}}\\{\\operatorname {rect} \\left({\\tfrac {t}{a}}\\right)\\}^{2}\\\\&={\\tfrac {1}{a}}\\ {a}^{2}\\ \\mathrm {sinc} ^{2}(a\\cdot f)={a}\\ \\mathrm {sinc} ^{2}(a\\cdot f).\\end{aligned}}}

>>See also

• `F33f`_`[Källén function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Källén_function]`_`f, also known as triangle function
• `F33f`_`[Tent map`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Tent_map]`_`f
• `F33f`_`[Triangular distribution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Triangular_distribution]`_`f
• `F33f`_`[Triangle wave`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Triangle_wave]`_`f, a piecewise linear periodic function
• `F33f`_`[Trigonometric functions`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Trigonometric_functions]`_`f

>>References

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f "Basic properties of splines and B-splines" (PDF). `*INF-MAT5340 Lecture Notes`*. p. 38.

`c`F0af`_`[↑ Back to top`#top]`_`f`a